Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Discover Test] TestID-69: Filtering, Test Suite: Filter actions in table field #9011

Conversation

ArgusLi
Copy link
Contributor

@ArgusLi ArgusLi commented Dec 5, 2024

Description

Adds a cypress test for the Discover Page.

This PR completes the "Filter actions in table field" test suite in TestID-69: Filtering. There is still the "Filter actions in expanded table" Test Suite to complete for that ticket.

Changelog

  • skip

Check List

  • All tests pass
    • yarn test:jest
    • yarn test:jest_integration

AMoo-Miki and others added 20 commits November 25, 2024 22:43
…rkspace is deleted (opensearch-project#8900)

* feat: optimize recent items and filter out items whose workspace is deleted

Signed-off-by: tygao <[email protected]>

* Changeset file for PR opensearch-project#8900 created/updated

* seperate link

Signed-off-by: tygao <[email protected]>

* update filter sequence

Signed-off-by: tygao <[email protected]>

---------

Signed-off-by: tygao <[email protected]>
Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com>
Fixes SQL monaco monarch tokens by separating the states for single quoted and double quoted strings so that both can appear properly

---------

Signed-off-by: Paul Sebastian <[email protected]>
Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com>
…h-project#8886)

* Bump `@opensearch-project/opensearch` from 2.9.0 to 2.13.0

Signed-off-by: Miki <[email protected]>

* Changeset file for PR opensearch-project#8886 created/updated

---------

Signed-off-by: Miki <[email protected]>
Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com>
…s link (opensearch-project#8919)

* page_references_insecure

Signed-off-by: Qxisylolo <[email protected]>

* typo

Signed-off-by: Qxisylolo <[email protected]>

* Changeset file for PR opensearch-project#8919 created/updated

* add https://numeraljs.com/ to lycheeignore

Signed-off-by: Qxisylolo <[email protected]>

* change https://numeraljs.com/ to http

Signed-off-by: Qxisylolo <[email protected]>

---------

Signed-off-by: Qxisylolo <[email protected]>
Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com>
…project#8920)

* support search dev tools by category name

Signed-off-by: Hailong Cui <[email protected]>

* Changeset file for PR opensearch-project#8920 created/updated

* address review comments

Signed-off-by: Hailong Cui <[email protected]>

---------

Signed-off-by: Hailong Cui <[email protected]>
Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com>
…et (opensearch-project#8888)

* Isolate objects based on workspace when calling get/bulkGet

Signed-off-by: yubonluo <[email protected]>

* Changeset file for PR opensearch-project#8888 created/updated

* add integration tests

Signed-off-by: yubonluo <[email protected]>

* optimize the code

Signed-off-by: yubonluo <[email protected]>

* optimize the code

Signed-off-by: yubonluo <[email protected]>

* optimize the code

Signed-off-by: yubonluo <[email protected]>

* optimize the function name

Signed-off-by: yubonluo <[email protected]>

* add data source validate

Signed-off-by: yubonluo <[email protected]>

* optimize the code

Signed-off-by: yubonluo <[email protected]>

---------

Signed-off-by: yubonluo <[email protected]>
Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com>
)

* replace default query with current query

Signed-off-by: Sean Li <[email protected]>

* Changeset file for PR opensearch-project#8930 created/updated

* adding unit tests

Signed-off-by: Sean Li <[email protected]>

---------

Signed-off-by: Sean Li <[email protected]>
Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com>
…ts (opensearch-project#8739)

* Check if workspaces exists when creating saved objects

Signed-off-by: yubonluo <[email protected]>

* Changeset file for PR opensearch-project#8739 created/updated

* optimize the code

Signed-off-by: yubonluo <[email protected]>

* fix test error

Signed-off-by: yubonluo <[email protected]>

* optimize the code

Signed-off-by: yubonluo <[email protected]>

* fix test errors

Signed-off-by: yubonluo <[email protected]>

* add integration tests

Signed-off-by: yubonluo <[email protected]>

---------

Signed-off-by: yubonluo <[email protected]>
Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com>
* Update Cypress to v12 (opensearch-project#8926)

* Update cypress to v12

Signed-off-by: Daniel Rowe <[email protected]>

* Add required e2e.js

Signed-off-by: Daniel Rowe <[email protected]>

* Changeset file for PR opensearch-project#8926 created/updated

* Update license header

Signed-off-by: Daniel Rowe <[email protected]>

* Update license in e2e.js

Signed-off-by: Daniel Rowe <[email protected]>

---------

Signed-off-by: Daniel Rowe <[email protected]>
Signed-off-by: Daniel Rowe <[email protected]>
Co-authored-by: Daniel Rowe <[email protected]>
Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com>

* fix: support imports without extensions in cypress webpack build (opensearch-project#8993)

* fix: support imports without extensions in cypress webpack build

Signed-off-by: Daniel Rowe <[email protected]>

* Changeset file for PR opensearch-project#8993 created/updated

* use typescript config

Signed-off-by: Daniel Rowe <[email protected]>

* fix lint

Signed-off-by: Daniel Rowe <[email protected]>

* disable new test isolation feature

This isolation was causing regressions

Signed-off-by: Daniel Rowe <[email protected]>

---------

Signed-off-by: Daniel Rowe <[email protected]>
Signed-off-by: Daniel Rowe <[email protected]>
Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com>

---------

Signed-off-by: Daniel Rowe <[email protected]>
Signed-off-by: Daniel Rowe <[email protected]>
Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com>
…ensearch-project#8876)

* [Query enhancements] use status 503 if opensearch throws 500

Signed-off-by: Joshua Li <[email protected]>

* update unit tests

Signed-off-by: Joshua Li <[email protected]>

---------

Signed-off-by: Joshua Li <[email protected]>
… is almost complete, just working on removing the filter.
Refactor to match OSD-functional-tests-layout.
Copy link
Contributor

github-actions bot commented Dec 5, 2024

❌ Invalid Prefix For Manual Changeset Creation

Invalid description prefix. Found "test Add a test for the Filter actions in the table field in the Discover Page.". Only "skip" entry option is permitted for manual commit of changeset files.

If you were trying to skip the changelog entry, please use the "skip" entry option in the ##Changelog section of your PR description.

@github-actions github-actions bot added failed changeset Skip-Changelog PRs that are too trivial to warrant a changelog or release notes entry and removed failed changeset labels Dec 5, 2024
yubonluo and others added 2 commits December 5, 2024 17:06
…9003)

* clear the attribute of error objects

Signed-off-by: yubonluo <[email protected]>

* Changeset file for PR opensearch-project#9003 created/updated

* Changeset file for PR opensearch-project#9003 deleted

---------

Signed-off-by: yubonluo <[email protected]>
Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com>
* bump url to 0.11.4

Signed-off-by: Joshua Li <[email protected]>

* Changeset file for PR opensearch-project#8611 created/updated

---------

Signed-off-by: Joshua Li <[email protected]>
Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com>
describe('index pattern dataset', () => {
// filter actions should exist for DQL
it('DQL', () => {
cy.selectIndexPatternDataset('DQL');
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for fully utilizing utils here across this test file.

specPattern: 'cypress/integration/**/*_spec.{js,jsx,ts,tsx}',
testIsolation: false,
testIsolation: true,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As a part of the Cypress I saw a couple existing tests that are not written in an isolated manner, which caused failures when I enabled this initially.

If all our tests pass with isolation on now, that's great! Let's just check the cypress tests on this PR when they run to verify that there are no new failures due to this enablement

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think that the other tests are running, I will revert the testIsolation to false and change my test to reflect the lack of test isolation.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Addressed in newest commit.

Comment on lines 13 to 16
Cypress.on('uncaught:exception', (_err) => {
// returning false here prevents Cypress from failing the test
return false;
});
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense, there are some uncaught errors that we do want to gracefully ignore. That being said, I feel there are times when bubbling up an uncaught exception would be really useful. For example, if a page fails to render it'd be nice to see the exception in the runner rather than having to run locally and dig for it.

Can we be a bit more selective here and only swallow the error you were seeing needed to be handled gracefully?

Ex.

const resizeObserverLoopErr = /^[^(ResizeObserver loop limit exceeded)]/;
Cypress.on('uncaught:exception', (err) => {
  /* returning false here prevents Cypress from failing the test */
  if (resizeObserverLoopErr.test(err.message)) {
    return false;
  }
});

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds good. I added this as I was getting a specific navigation error. Keeping the ignore selective makes a lot of sense to me.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Addressed in newest commit.

ArgusLi and others added 6 commits December 5, 2024 10:05
…project#8935)

Signed-off-by: Joshua Li <[email protected]>
Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com>
Change testIsolation to be false, ignore uncaught errors to be more selective.
Search bar objects that are non-page specific have been kept as commands.
@ArgusLi ArgusLi changed the base branch from main to cypress-unification December 9, 2024 20:48
@ananzh ananzh added the discover_2.0-test Issues that are specific to the Discover 2.0 testing initiative label Dec 19, 2024
@ArgusLi
Copy link
Contributor Author

ArgusLi commented Dec 24, 2024

Superseded by #9119

@ArgusLi ArgusLi closed this Dec 24, 2024
@ArgusLi ArgusLi deleted the testid-69-filtering-suite-table-field branch December 24, 2024 20:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discover_2.0-test Issues that are specific to the Discover 2.0 testing initiative first-time-contributor Skip-Changelog PRs that are too trivial to warrant a changelog or release notes entry
Projects
None yet
Development

Successfully merging this pull request may close these issues.